 |
|
 |
Subject: Instance Member Embed....does not exist |
 |
 |
 |
Product Area: Domino Designer on Eclipse (DDE) |
 |
Technical Area: Application Development |
 |
Platform: ALL |
 |
Release: 8.5.2 |
 |
Reproducible: Always |
 |
 |
 |
 |
Hi All,
Pls help in my case. I have form to be filled by the users and a file to be attached when they browse the path. To achieve this, have created a button for "Browse" and then created a submit button which runs the agent. But rtitem is empty and due to that, getting error that "Instance Member embed...does not exist. Understood that rtitem has values and the input is stored in the value(0). Confused how to proceed. Pls help.
*****************Browse Button****************
Sub Click(Source As Button)
Dim s As New NotesSession
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = ws.CurrentDocument
Start:
filename = ws.OpenFileDialog( False, "Select upload file.", "", "D:\Program Files\IBM\Lotus\Notes\")
If Isempty(filename) Then
Msgbox "File is Empty"
Goto Start
End If
If Cstr(filename(0))="" Then
Msgbox "File is Not Avilable"
Goto Start
End If
Call uidoc.FieldSetText ("IdFile", Cstr(filename(0)))
Set filesys = CreateObject("Scripting.FileSystemObject")
path = filesys.GetAbsolutePathName(filename(0))
FileName = filesys.GetFileName(path)
FullPath = Replace ( path, FileName, "")
Call uidoc.FieldSetText ("FullPath", Cstr(FullPath))
Call uidoc.FieldSetText ("FileName", Cstr(FileName))
End Sub
*********************************************
***************Submit************************
Sub Initialize
Dim s As New NotesSession
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim filesys,FullPath,OUName,FileName,Path
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim Object As NotesEmbeddedObject
Dim rtitem As Variant
Set uidoc = ws.CurrentDocument
OUName = uidoc.FieldGetText( "OUName" )
FileName = uidoc.FieldGetText( "FileName" )
Set doc = uidoc.document
Dim FullPath1 As variant
'FullPath1 = doc.Getitemvalue("FullPath")
'FullPath = FullPath1(0)
Set rtitem = doc.GetFirstItem("FullPath")
Set Object = rtitem.EmbedObject(EMBED_ATTACHMENT,"",FileName,OUName)
Call doc.Save(True,True)
End Sub
**********************************************
 
Feedback number WEBB94UBBZ created by ~Howard Nimnukonygon on 02/12/2013

Status: Open
Comments:

|
|  |
|